#pragma once

#ifndef VTTMEMORYALLOCATOR_H
#define VTTMEMORYALLOCATOR_H

#include "VTTObject.h"

/**
  *	Memory Allocators are objects that allocate memory on the heap but can exist
  * without this memory. VTTImage objects for example load the raw image data
  * into memory that was allocated on the heap. VTTImage objects can usually
  * exist without this memory (when they correspond to an image file), because
  * they can reload the image data when it is needed again.
  */
class VTTMemoryAllocator : public VTTObject
{
public:
	VTTMemoryAllocator( void );
	virtual ~VTTMemoryAllocator( void );

	virtual UINT32 FreeAllocatedMemory( void ) = 0;

	bool HasInternalData( void ) const;

protected:
	/** Number of bytes that are allocated on the heap by the object */
	UINT32 mBytesOnTheHeap;
	/** Boolean value indicating whether the object has allocated memory on the heap or not */
	bool mHasInternalData;
};

#endif